<!doctype html>
<html lang="{{ app()->getLocale() }}">
<head>
    <title> {{$title or '阿玛迪斯'}}</title>
    <meta charset="UTF-8"/>
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
    <link rel="stylesheet" type="text/css" href="{{('css/index.css')}}"/>
    <link rel="stylesheet" type="text/css" href="//at.alicdn.com/t/font_564101_wp88yn5ahn8tcsor.css">
    <script src="https://cdn.jsdelivr.net/npm/vue"></script>
    <script type="application/javascript" src="{{asset('js/jquery.min.js')}}"></script>

</head>
<body>
@section('sidebar')
    <header class="nav" id="header">
        <label class="title">{{$title or '阿玛迪斯'}}</label>
        @if(isset($hasback)?true:false)
            <div class="back" @click="back">
                <i class="amds icon-back"></i>
            </div>
        @endif
    </header>
@show
<section>
    @yield("content")
</section>

@section('footer')
    @isset($bar)
        <footer class="footer" id="footer">
            <ul>
                <li class="homes">
                    <div class="">
                        <img src="{{asset('images/002.png')}}"/>
                    </div>
                    <div class="">
                        首页
                    </div>
                </li>
                <li class="team teams" @click="tabClick(2)">
                    <div class="">
                        <img src="{{asset('images/003.png')}}"/>
                    </div>
                    <div class="">
                        我的团队
                    </div>
                </li>
                <li class="help" @click="tabClick(2)">
                    <div class="">
                        <img src="{{asset('images/005.png')}}"/>
                    </div>
                    <div>
                        帮助中心
                    </div>
                </li>
                <li class="me" @click="tabClick(3)">
                    <div id="">
                        <img src="{{asset('images/007.png')}}"/>
                    </div>
                    <div class="">
                        我的
                    </div>
                </li>
            </ul>
        </footer>
    @endisset
@show

</body>
<script type="application/javascript" src="{{asset('js/layer/layer.js')}}"></script>
@yield('script')

<script>
    new Vue({
        el: '#header',
        methods: {
            back: function () {
                window.history.go(-1);
            }
        }
    })
    var auth = false;
    @auth
        auth = true;
    @endauth
    new Vue({
        el: '#footer',
        data: function () {
            return {
                auth: auth
            }
        },
        methods: {
            tabClick: function (index) {
                switch (index) {
                    case 0:
                        break;
                    case 1:
                        break;
                    case 2:
                        break;
                    case 3:
                        break;
                }
            }
        }
    })
</script>
</html>